Problem using PCL 1.8 with ROS Indigo
Hi all,
I am trying to compile a package based on the lccp_segmentation algorithm available in the pcl-trunk. The compilation and installation of the pcl-trunk were fine since I have the same version of the package in a simple .cpp file (not in ROS), and I can compile everything with no problems. But when I try to compile my ROS package it seems to be a conflict between PCL 1.7 and 1.8, since the output in the terminal is something like:
link library [libpcl_common.so] in /usr/lib may be hidden by files in: /usr/local/lib
Which I guess it yields to the following error:
*** No rule to make target `/usr/lib/libboost_system-mt.so', needed by `/home/nicola/ros_ws/master_thesis/devel/lib/segmentation_lccp/segmentationLCCP'
My setup is: - Ubuntu 14.04.3 LTS - Ros indigo - PCL (1.7 and 1.8 are both installed)
I have just a very basic knowledge about the linking stuff and cmake, I also surfed a lot in the internet but none had my same problem. I hope to have gave you enough information, below there are the outputs of the catkin_make and cmake commands of the above commented source codes.
Thanks in advance,
Here the output of the catkin_make command:
catkin_make --only-pkg-with-deps segmentation_lccp
Base path: /home/nicola/ros_ws/master_thesis
Source space: /home/nicola/ros_ws/master_thesis/src
Build space: /home/nicola/ros_ws/master_thesis/build
Devel space: /home/nicola/ros_ws/master_thesis/devel
Install space: /home/nicola/ros_ws/master_thesis/install
Whitelisted packages: segmentation_lccp
####
#### Running command: "make cmake_check_build_system" in "/home/nicola/ros_ws/master_thesis/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/nicola/ros_ws/master_thesis/devel
-- Using CMAKE_PREFIX_PATH: /home/nicola/ros_ws/master_thesis/devel;/opt/ros/indigo
-- This workspace overlays: /home/nicola/ros_ws/master_thesis/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/nicola/ros_ws/master_thesis/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests
-- catkin 0.6.16
-- BUILD_SHARED_LIBS is on
-- Using CATKIN_WHITELIST_PACKAGES: segmentation_lccp
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - segmentation_lccp
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'segmentation_lccp'
-- ==> add_subdirectory(grasping_novel_objects/segmentation_lccp)
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
-- serialization
-- checking for module 'libopenni2'
-- package 'libopenni2' not found
-- Could NOT find OpenNI2 (missing: OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS)
** WARNING ** io features related to openni2 will be disabled
-- Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR)
** WARNING ** io features related to ensenso will be disabled
-- Could NOT find DAVIDSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR)
** WARNING ** io features related to davidSDK will be disabled
-- Could NOT find DSSDK (missing: _DSSDK_LIBRARIES)
** WARNING ** io features related to dssdk will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
-- checking for module 'libopenni2'
-- package 'libopenni2' not found
-- Could NOT find OpenNI2 (missing: OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS)
** WARNING ** visualization features related to openni2 will be ...
I'm getting the same problem, except I compiled pcl 1.8 from source and
make install
'd it. I tried uninstalling pcl 1.7 completelysudo apt-get uninstall libpcl-1.7-all
andsudo apt-get uninstall libpcl-1.7-all-dev
but then I get errors because I have no pcl_ros nor pcl_conversions...I managed to make it work with both 1.7 and 1.8 libraries installed. However I guess that you can simply installed that ros packages you deleted and that's all: sudo apt-get install ros-indigo-pcl*
If it may helps here there is a simple C++ library based on PCL 1.8 and here the ROS pkg that uses it.
got it to work by switching the order I call dependencies in my CMakelists.txt, basically I had to look at pcl BEFORE pcl_ros, that way it found the correct pcl 1.8 libraries